<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		
		<script type="text/javascript">
			/*水仙花数：一个三位数每个位上的数的三次幂之和等于它本身*/
			
			var count=0
			for (var i=100;i<1000;i++){
				
				var bai=parseInt(i/100);
				var shi=parseInt((i%100)/10);
				var ge=parseInt(i%10);
				
				if(i==bai*bai*bai+shi*shi*shi+ge*ge*ge){
					count++;
					document.write("水仙花数："+i+"<br />");
					
				}
				
			}
			document.write("水仙花数有"+count+"个"+"<br />");
			
			
		</script>
	</head>
	<body>
	</body>
</html>
